"""day01 URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from django.urls import path, re_path
from app01 import views
from django.views.static import serve

# from . import settings

urlpatterns = [
    # re_path('^upload/(?P<path>.*/$)', serve, {'document': settings.MEDIA_ROOT}),
    re_path('^static/upload/(?P<path>.*/$)', serve,
            {'document_root': 'static/upload/'}),

    url(r'^admin/', admin.site.urls),

    # path('', views.mytem),  # 首页
    # path('appends/', views.appends),  # 添加用户
    # path('updat/', views.updat),  # 修改用户
    # path('dels/', views.dels),  # 删除用户_ciew()

    path('register/', views.Register.as_view()),  # 用户注册接口

    path('login/', views.Login.as_view()),  # 用户登录接口

    path('mycode/', views.MyCode.as_view()),  #

    path('index/', views.weibo_back),  # 回调接口

    path('uploadFile/', views.UploadFile.as_view()),  # 上传接口

    path('category/', views.CategoryList.as_view()),  #

    path('addCourse/', views.AddCourse.as_view()),  #

    path('courseList/', views.CourseList.as_view()),  #

    path('singlecourse/', views.SingleCourse.as_view()),  #

    path('addCategory/', views.AddCategory.as_view()),  #

    path('commentinsert/', views.CommentInsert.as_view()),  #

    path('commentlist/', views.CommentList.as_view()),  #

    path('courseSearch/', views.CourseSearch.as_view()),  #

    path('flowsinsert/', views.FlowsInsert.as_view()),

    path('getflow/', views.GetFlow.as_view()),

    path('getmyflow/', views.get_myflow),

    path('myrank/', views.myrank),

    path('getcode/', views.SingleCode.as_view()),

    path('ordersinsert/',  views.OrdersInsert.as_view()),

    path('orderslist/', views.OrdersList.as_view()),

    path('getuser/', views.GetUser.as_view()),

    path('getonline/', views.GetOnLine.as_view()),

    path('websocket_link/', views.websocket_link),

    path('websocket_link/', views.websocket_send),
    
    
]
 
